//
//  data_info_transfer.h
//  Draco
//
//  Created by Liu Dafan on 12-2-20.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#ifndef Draco_data_info_transfer_h
#define Draco_data_info_transfer_h

#define DIR_COLUMNFAMILY "DIRINFO"
#define FILE_COLUMNFAMILY "FILEINFO"

enum DIR_INFO_STRING_ID
{
    DIR_INFO_ID = 0,
    DIR_INFO_NAME,
    DIR_INFO_PARENT_ID,
    DIR_INFO_COUNT,
    DIR_INFO_SIZE,
    DIR_INFO_CREATE_TIME,
    DIR_INFO_UPDATE_TIME,
    DIR_INFO_DELETE_TIME,
    DIR_INFO_IS_DELETE,
    DIR_INFO_TOTAL
};

const char* DIR_INFO_STRING_STR[] =
{
    DIR_COLUMNFAMILY":id",
    DIR_COLUMNFAMILY":name",
    DIR_COLUMNFAMILY":parentid",
    DIR_COLUMNFAMILY":filecount",
    DIR_COLUMNFAMILY":totalsize",
    DIR_COLUMNFAMILY":createtime",
    DIR_COLUMNFAMILY":updatetime",
    DIR_COLUMNFAMILY":deletetime",
    DIR_COLUMNFAMILY":isdeleted"
};

const char* DIR_INFO_STRING_TAG[] = 
{
    "%llu", //id
    "%s",   //name
    "%llu", //parentid
    "%u",   //count
    "%llu", //size
    "%u",   //createtime
    "%u",   //updatetime
    "%u",   //deletetime
    "%d"    //isdeleted
};

enum FILE_INFO_STRING_ID
{
    FILE_INFO_PARENT_ID = 0,
    FILE_INFO_NAME,
    FILE_INFO_VERSION,
    FILE_INFO_CREATE_TIME,
    FILE_INFO_DELETE_TIME,
    FILE_INFO_LENGTH,
    FILE_INFO_COMPRESS,
    FILE_INFO_SECURITY,
    FILE_INFO_IS_DELETE,
    FILE_INFO_IS_SHARING,
    FILE_INFO_DATA_CRC,
    FILE_INFO_HEAD_CRC,
    FILE_INFO_LOC_FILE,
    FILE_INFO_LOC_OFFSET,
    FILE_INFO_LOC_LENGTH,
    FILE_INFO_TOTAL
};

const char* FILE_INFO_STRING_STR[] =
{
    FILE_COLUMNFAMILY":parentid",
    FILE_COLUMNFAMILY":name",
    FILE_COLUMNFAMILY":version",
    FILE_COLUMNFAMILY":createtime",
    FILE_COLUMNFAMILY":deletetime",
    FILE_COLUMNFAMILY":length",
    FILE_COLUMNFAMILY":compresstype",
    FILE_COLUMNFAMILY":securitytype",
    FILE_COLUMNFAMILY":isdeleted",
    FILE_COLUMNFAMILY":issharing",
    FILE_COLUMNFAMILY":datacrc",
    FILE_COLUMNFAMILY":headcrc",
    FILE_COLUMNFAMILY":loc_physicalfilename",
    FILE_COLUMNFAMILY":loc_offset",
    FILE_COLUMNFAMILY":loc_length"
};

const char* FILE_INFO_STRING_TAG[] = 
{
    "%llu", //parentid
    "%s",   //name
    "%u",   //version
    "%u",   //createtime
    "%u",   //deletetime
    "%u",   //length
    "%u",   //compress
    "%u",   //security
    "%d",   //isdelete
    "%d",   //issharing
    "%u",   //datacrc
    "%u",   //headcrc
    "%s",   //physical_file_name
    "%llu", //offset
    "%u",   //length
};

#endif
